<?php
/* @var $this DefaultController */
/* @var $dataProvider CActiveDataProvider */

?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta charset="utf-8" />
    <title>FCMS后台管理系统</title>
    <meta name="description" content="overview &amp; stats" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
    <!-- bootstrap & fontawesome -->
    <link rel="stylesheet" href="<?=Yii::app()->request->baseUrl;?>/resource/backend/css/bootstrap.min.css" />
    <link rel="stylesheet" href="<?=Yii::app()->request->baseUrl;?>/resource/backend/font-awesome/4.5.0/css/font-awesome.min.css" />
    <!-- page specific plugin styles -->
    <link rel="stylesheet" href="<?=Yii::app()->request->baseUrl;?>/resource/backend/css/jquery-ui.custom.min.css" />
    <link rel="stylesheet" href="<?=Yii::app()->request->baseUrl;?>/resource/backend/css/chosen.min.css" />
    <link rel="stylesheet" href="<?=Yii::app()->request->baseUrl;?>/resource/backend/css/bootstrap-datepicker3.min.css" />
    <link rel="stylesheet" href="<?=Yii::app()->request->baseUrl;?>/resource/backend/css/bootstrap-timepicker.min.css" />
    <link rel="stylesheet" href="<?=Yii::app()->request->baseUrl;?>/resource/backend/css/daterangepicker.min.css" />
    <link rel="stylesheet" href="<?=Yii::app()->request->baseUrl;?>/resource/backend/css/bootstrap-datetimepicker.min.css" />
    <link rel="stylesheet" href="<?=Yii::app()->request->baseUrl;?>/resource/backend/css/bootstrap-colorpicker.min.css" />
    <!-- text fonts -->
    <link rel="stylesheet" href="<?=Yii::app()->request->baseUrl;?>/resource/backend/css/fonts.googleapis.com.css" />
    <!-- ace styles -->
    <link rel="stylesheet" href="<?=Yii::app()->request->baseUrl;?>/resource/backend/css/ace.min.css" class="ace-main-stylesheet" id="main-ace-style" />
    <!--[if lte IE 9]>
    <link rel="stylesheet" href="<?=Yii::app()->request->baseUrl;?>/resource/backend/css/ace-part2.min.css" class="ace-main-stylesheet" />
    <![endif]-->
    <link rel="stylesheet" href="<?=Yii::app()->request->baseUrl;?>/resource/backend/css/ace-skins.min.css" />
    <link rel="stylesheet" href="<?=Yii::app()->request->baseUrl;?>/resource/backend/css/ace-rtl.min.css" />
    <!--[if lte IE 9]>
    <link rel="stylesheet" href="<?=Yii::app()->request->baseUrl;?>/resource/backend/css/ace-ie.min.css" />
    <![endif]-->
    <!-- inline styles related to this page -->
    <!-- ace settings handler -->
    <script src="<?=Yii::app()->request->baseUrl;?>/resource/backend/js/ace-extra.min.js"></script>
    <!-- HTML5shiv and Respond.js for IE8 to support HTML5 elements and media queries -->
    <!--[if lte IE 8]>
    <script src="<?=Yii::app()->request->baseUrl;?>/resource/backend/js/html5shiv.min.js"></script>
    <script src="<?=Yii::app()->request->baseUrl;?>/resource/backend/js/respond.min.js"></script>
    <![endif]-->
</head>
<body>

<div class="main-container ace-save-state" id="main-container">
    <script type="text/javascript">
        try{ace.settings.loadState('main-container')}catch(e){}
    </script>
    <!-- /.sidebar_left -->
    <div class="main-content">
        <div class="main-content-inner">
            <div class="breadcrumbs ace-save-state" id="breadcrumbs">
                <ul class="breadcrumb">
                    <li><i class="ace-icon fa fa-home home-icon"></i><a href="<?=$this->createUrl('default/index')?>">首页</a></li>
                    <li class="active">控制面板</li>
                </ul><!-- /.breadcrumb -->

                <div class="nav-search" id="nav-search">
                    <form class="form-search">
                        <span class="input-icon">
                            <input type="text" placeholder="Search ..." class="nav-search-input" id="nav-search-input" autocomplete="off" />
                            <i class="ace-icon fa fa-search nav-search-icon"></i>
                        </span>
                    </form>
                </div><!-- /.nav-search -->
            </div>

            <div class="page-content">
                <div class="page-header">
                    <h1>
                        控制面板
                        <small><i class="ace-icon fa fa-angle-double-right"></i> 状态</small>
                    </h1>
                </div><!-- /.page-header -->

                <div class="row">
                    <div class="col-md-12 infobox-container">
                        <div class="infobox infobox-green">
                            <div class="infobox-icon"><i class="ace-icon fa fa-file"></i></div>
                            <div class="infobox-data">
                                <span class="infobox-data-number"><?= $statics['ARTICLE'][0] ?></span>
                                <div class="infobox-content">文章</div>
                            </div>
                            <div class="stat stat-success"><?= $statics['ARTICLE'][1] ?>%</div>
                        </div>
                        <div class="infobox infobox-blue">
                            <div class="infobox-icon"><i class="ace-icon fa fa-comments"></i></div>
                            <div class="infobox-data">
                                <span class="infobox-data-number"><?= $statics['COMMENT'][0] ?></span>
                                <div class="infobox-content">评论</div>
                            </div>
                            <div class="badge badge-success"><?= $statics['COMMENT'][1] ?>%<i class="ace-icon fa fa-arrow-up"></i></div>
                        </div>
                        <div class="infobox infobox-pink">
                            <div class="infobox-icon"><i class="ace-icon fa fa-users"></i></div>
                            <div class="infobox-data">
                                <span class="infobox-data-number"><?= $statics['USER'][0] ?></span>
                                <div class="infobox-content">用户</div>
                            </div>
                            <div class="stat stat-important"><?= $statics['USER'][1] ?>%</div>
                        </div>
                        <div class="infobox infobox-red">
                            <div class="infobox-icon"><i class="ace-icon fa fa-link"></i></div>
                            <div class="infobox-data">
                                <span class="infobox-data-number"><?= $statics['FRIEND_LINK'][0] ?></span>
                                <div class="infobox-content">友情链接</div>
                            </div>
                        </div>
                    </div>
                    <div class="col-xs-12">
                        <div class="col-xs-6">
                            <div class="widget-box transparent" id="recent-box">
                                <div class="widget-header">
                                    <h4 class="widget-title lighter smaller">
                                        <i class="ace-icon fa fa-rss orange"></i>环境
                                    </h4>
                                </div>

                                <div class="widget-body">
                                    <div class="widget-main padding-4">
                                        <div class="tab-content padding-8">
                                            <div id="task-tab" class="tab-pane active">
                                                <ul id="tasks" class="item-list">
                                                    <li class="item-orange clearfix">
                                                        <span class="text-capitalize"><b>FoundCMS : </b></span><?=Yii::app()->params['version'];?>
                                                    </li>
                                                    <li class="item-red clearfix">
                                                        <span class="text-capitalize"><b>Web Server : </b><?= $info['OPERATING_ENVIRONMENT'] ?></span>
                                                    </li>
                                                    <li class="item-default clearfix">
                                                        <span class="text-capitalize"><b>数据库信息 : </b><?= $info['DB_INFO'] ?></span>
                                                    </li>
                                                    <li class="item-blue clearfix">
                                                        <span class="text-capitalize"><b>文件上传限制 : </b><?= $info['UPLOAD_MAX_FILE_SIZE'] ?></span>
                                                    </li>
                                                    <li class="item-grey clearfix">
                                                        <span class="text-capitalize"><b>脚本超时限制 : </b><?= $info['MAX_EXECUTION_TIME'] ?></span>
                                                    </li>
                                                    <li class="item-green clearfix">
                                                        <span class="text-capitalize"><b>PHP执行方式 : </b><?= $info['PHP_RUN_MODE'] ?></span>
                                                    </li>
                                                </ul>
                                            </div>

                                        </div>
                                    </div><!-- /.widget-main -->
                                </div><!-- /.widget-body -->
                                <!-- PAGE CONTENT ENDS -->
                            </div><!-- /.col -->
                        </div>
                        <div class="col-xs-6">
                            <div class="widget-box transparent" id="recent-box">
                                <div class="widget-header">
                                    <h4 class="widget-title lighter smaller">
                                        <i class="ace-icon fa fa-rss orange"></i>状态
                                    </h4>
                                </div>

                                <div class="widget-body">
                                    <div class="widget-main padding-4">
                                        <div class="tab-content padding-8">
                                            <div id="task-tab" class="tab-pane active">
                                                <ul id="tasks" class="item-list">
                                                    <li class="item-orange clearfix">
                                                        <span class="text-capitalize"><b>内存 : </b></span>
                                                        <?php if (PHP_OS == 'Linux') {
                                                            echo $status['MEM']['NUM'];
                                                        } else {
                                                            echo Yii::t('app', 'Only supported linux system');
                                                        }
                                                        ?>
                                                    </li>
                                                    <li class="item-red clearfix">
                                                        <span class="text-capitalize"><b>真实内存 : </b>
                                                            <div style="width: <?= $status['MEM']['PERCENTAGE'] ?>;" class="progress-bar progress-bar<?=$status['MEM']['PERCENTAGE']>80 ? '-danger' : ''?>"></div>
                                                            <?php if (PHP_OS == 'Linux') {
                                                                echo $status['REAL_MEM']['NUM'];
                                                            } else {
                                                                echo Yii::t('app', 'Only supported linux system');
                                                            }
                                                            ?>
                                                            <div style="width: <?= $status['REAL_MEM']['PERCENTAGE'] ?>;" class="progress-bar progress-bar<?=$status['REAL_MEM']['PERCENTAGE']>80 ? '-danger' : ''?>"></div>
                                                        </span>
                                                    </li>
                                                    <li class="item-default clearfix">
                                                        <span class="text-capitalize"><b>硬盘 : </b>
                                                            <div class="progress progress-small progress-striped active">
                                                                <div class="progress-bar progress<?=$status['DISK_SPACE']['PERCENTAGE']>80 ? '-danger' : ''?>" style="width:<?= $status['DISK_SPACE']['PERCENTAGE'] ?>%;"></div>
                                                            </div>
                                                        </span>
                                                    </li>
                                                    <li class="item-blue clearfix">
                                                        <span class="text-capitalize">&nbsp;</span>
                                                    </li>
                                                    <li class="item-grey clearfix">
                                                        <span class="text-capitalize">&nbsp;</span>
                                                    </li>
                                                    <li class="item-green clearfix">
                                                        <span class="text-capitalize">&nbsp;</span>
                                                    </li>
                                                </ul>
                                            </div>

                                        </div>
                                    </div><!-- /.widget-main -->
                                </div><!-- /.widget-body -->
                                <!-- PAGE CONTENT ENDS -->
                            </div><!-- /.col -->
                        </div>
                        <!-- PAGE CONTENT BEGINS -->
                    </div><!-- /.row -->
            </div><!-- /.page-content -->
        </div>
    </div><!-- /.main-content -->
</div><!-- /.main-container -->

<!-- basic scripts -->
<!--[if !IE]> --><script src="<?=Yii::app()->request->baseUrl;?>/resource/backend/js/jquery-2.1.4.min.js"></script><!-- <![endif]-->
<!--[if IE]><script src="<?=Yii::app()->request->baseUrl;?>/resource/backend/js/jquery-1.11.3.min.js"></script><![endif]-->
<script type="text/javascript">
    if('ontouchstart' in document.documentElement) document.write("<script src='<?=Yii::app()->request->baseUrl;?>/resource/backend/js/jquery.mobile.custom.min.js'>"+"<"+"/script>");
</script>
<script src="<?=Yii::app()->request->baseUrl;?>/resource/backend/js/bootstrap.min.js"></script>
<!-- page specific plugin scripts -->
<!-- inline scripts related to this page -->
</body>
</html>
